<div class="layui-fluid" id="VIEW-list-table" lay-title="日志列表" lig-title="log-title">
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header" lig-lang="label-searchTitle">筛选数据</div>
                <div class="layui-card-body">
                    <form class="layui-form" lay-filter="lig-log-searchform">
                        <div class="layui-row">
                            <div class="layui-inline">
                                <label class="layui-form-label" lig-lang="log-logType">类别</label>
                                <div class="layui-inline">
                                    <select name="logType">
                                        <option value=""></option>
                                        <option value="登录">登录</option>
                                        <option value="防伪">防伪</option>
                                        <option value="溯源">溯源</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label" style="width:85px;" lig-lang="log-operateTimeQz">操作起止时间</label>
                                <div class="layui-inline">
                                    <input type="text" name="operateTimeQs" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-inline">--</div>
                                <div class="layui-inline">
                                    <input type="text" name="operateTimeJs" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-row layui-col-space10">
                                    <div class="layui-col-xs6">
                                        <div class="layui-btn layui-btn-sm" lay-filter="lig-log-search" lig-lang="btn-search">查询</div>
                                    </div>
                                    <div class="layui-col-xs6">
                                        <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary" lig-lang="btn-reset">重置</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="layui-card">
                <div class="layui-card-body nepadmin-table-full">
                    <div class="layui-btn-container nepadmin-pad-t10 nepadmin-pad-l10">
                        <div class="layui-btn layui-btn-sm layui-btn-primary" lay-filter="lig-log-remove" lig-lang="btn-delete">删除</div>
                    </div>
                    <table lay-filter="lig-log-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['admin', 'table', 'form', 'laydate', 'laytpl', 'jquery','lig'], function (admin, table, form, laydate, laytpl, $, lig) {
        var _searchForm = '[lay-filter="lig-log-searchform"]';
        laydate.render({
            elem: _searchForm + ' input[name="operateTimeQs"]'
        });
        laydate.render({
            elem: _searchForm + ' input[name="operateTimeJs"]'
        });
        form.render();

        lig.table({
            elem: '[lay-filter="lig-log-table"]',
            url: 'setting/log/page',
            cols: [[
                { title: '', type: 'checkbox', fixed: true, width: 60 },
                { title: '<span lig-lang="log-logType">类型</span>', field: 'logType', minWidth: 60 },
                { title: '<span lig-lang="log-logName">详情</span>', field: 'logName', minWidth: 200 },
                { title: '<span lig-lang="log-operateTime">操作时间</span>', field: 'operateTime', minWidth: 100, templet:'<div>{{ layui.util.toDateString(d.operateTime, "yyyy-MM-dd HH:mm:ss") }}</div>'},
                { title: '<span lig-lang="log-operatorName">操作人</span>', field: 'operatorName', minWidth: 80},
                { title: '<span lig-lang="log-ip">IP</span>', field: 'ip', minWidth: 80 }
            ]]
        },{
            entity: 'log',
            primaryField: 'logId',

            removeUrl: 'setting/log/remove',
            getUrl: 'setting/log/{logId}'
        });

    })
</script>